import request from '../utils/request'

export function category() {
    return request({
        url: '/category',
        method: 'get'
    })
}
export function newList(params) {
    return request({
        url: '/post',
        method: 'get',
        params
    })
}
export function articleDetail(id) {
    return request({
        url: '/post/' + id,
        method: 'get'
    })
}
export function post_comment(id) {
    return request({
        url: '/post_comment/' + id,
        method: 'get'
    })
}
export function send_comment(id, data) {
    return request({
        url: '/post_comment/' + id,
        method: 'post',
        data
    })
}
export function haslike(id) {
    return request({
        url: '/post_like/' + id,
        method: 'get',
    })
}
export function collections(id) {
    return request({
        url: '/post_star/' + id,
        method: 'get',
    })
}
